package com.fanhao.dllo.justforyou.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import com.fanhao.dllo.justforyou.R;


/**
 * Created by dllo on 15/10/22.
 */
public class SplashActivity extends Activity {

    // 定义一个handler对象,进行延迟跳转
    private Handler handler;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);

        handler = new Handler(new Handler.Callback() {
            @Override
            public boolean handleMessage(Message msg) {
                Intent intent = new Intent();
                intent.setClass(SplashActivity.this,
                                      LoginActivity.class);
                startActivity(intent);
                finish();
                return false;
            }
        });
        handler.sendEmptyMessageDelayed(100,3000);
    }
}
